<?php
/**
 * Created by PhpStorm.
 * User: yuchong
 * Date: 15-4-28
 * Time: 下午3:43
 */
class Editor_model extends MY_Model {

    public function __construct() {
        $this->_table = 'db_admin';
        parent::__construct();
    }


    /**
    *   通过别名获取信息， 前台展示的信息不能是数据表里面的所有字段
     *  author:yuchong
     *
     */
    public function getByNickname($name){
        $res = $this->db->select("username,nickname,intro,photo,email")
                    ->from($this->_table)
                    ->where('nickname', $name)
                    ->get()
                    ->row_array();
        return $res ? $res : false;
    }







}